#!/usr/bin/env bash
# encoding: utf-8.0


joinByChar() {
  local IFS="$1"
  shift
  echo "$*"
}

array=('a' 'b' 'c');
echo "${array[@]}"; # prints: a b c
array=('d' "${array[@]}");
echo "${array[@]}"; # prints: d a b c
array=("${array[@]:1}")
echo "${array[@]}"; # prints: a b c
unset array[-1]
echo "${array[@]}"; # prints: a b
joindByDot=$(joinByChar '.' ${array[@]})
echo "join by dot:${joindByDot}"

